<?php

class Application_Form_Login extends Zend_Form
{

    public function init()
    {
        $this->setName("login");
        $this->setMethod('post');
             
        // Nom
        $nom = new Zend_Form_Element_Text('nom');
        $nom->setLabel('Nom')
            ->setRequired(true)
            ->addFilter('StripTags')
            ->addFilter('StringTrim')
            ->addValidator('NotEmpty');
        // Mot de passe            
        $motDePasse = new Zend_Form_Element_Password('motdepasse');
        $motDePasse->setLabel('Nom')
                   ->setRequired(true)
                   ->addFilter('StripTags')
                   ->addFilter('StringTrim')
                   ->addValidator('NotEmpty');
        // Bouton envoyer
        $envoyer = new Zend_Form_Element_Submit('envoyer');
        $envoyer->setAttrib('id', 'boutonenvoyer');
        // Ajout des éléments
        $this->addElements(array($nom, $motDePasse, $envoyer));
    }
}

